package com.lej.app_interact

import com.lej.core.base.BaseModel
import com.lej.core.base.BaseViewModel
import com.lej.dataservice.club.bean.interact.FeedInfo
import com.lej.dataservice.club.http.base.getBody
import com.lej.dataservice.club.http.checkData

class InteractViewModel : BaseViewModel<BaseModel>() {
    var feedTimestamp = 0L

    suspend fun getInteractData(): List<FeedInfo> {
        val info = InteractApiService.instance
            .feedList(getBody("size" to 10, "timestamp" to feedTimestamp))
            .checkData()
        feedTimestamp = info.timestamp
        return info.feedList
    }
}